#!/usr/bin/env python3                                                                                                                                                                                                                
import pyscf
import numpy
from pyscf import gto, scf, ci,df,lib, dft
from pyscf.lib import chkfile
import scipy
from time import ctime, time
	   
lib.num_threads(6)
TimeStart = time()
mol = gto.Mole(
        atom='''
             C   -6.1218053484 -0.7171513386  0.0000000000 
             C   -4.9442285958 -1.4113046519  0.0000000000
             C   -3.6803098659 -0.7276441672  0.0000000000 
             C   -2.4688049693 -1.4084918967  0.0000000000
             C   -1.2270315983 -0.7284607452  0.0000000000
             C    0.0000000000 -1.4090846909  0.0000000000
             C    1.2270315983 -0.7284607452  0.0000000000 
             C    2.4688049693 -1.4084918967  0.0000000000 
             C    3.6803098659 -0.7276441672  0.0000000000
             C    4.9442285958 -1.4113046519  0.0000000000
             C    6.1218053484 -0.7171513386  0.0000000000 
             C    6.1218053484  0.7171513386  0.0000000000
             C    4.9442285958  1.4113046519  0.0000000000
             C    3.6803098659  0.7276441672  0.0000000000
             C    2.4688049693  1.4084918967  0.0000000000
             C    1.2270315983  0.7284607452  0.0000000000
             C    0.0000000000  1.4090846909  0.0000000000
             C   -1.2270315983  0.7284607452  0.0000000000
             C   -2.4688049693  1.4084918967  0.0000000000
             C   -3.6803098659  0.7276441672  0.0000000000
             C   -4.9442285958  1.4113046519  0.0000000000
             C   -6.1218053484  0.7171513386  0.0000000000
             H   -7.0692917090 -1.2490690741  0.0000000000
             H   -4.9430735200 -2.4988605526  0.0000000000
             H   -2.4690554105 -2.4968374995  0.0000000000
             H    0.0000000000 -2.4973235097  0.0000000000
             H    2.4690554105 -2.4968374995  0.0000000000
             H    4.9430735200 -2.4988605526  0.0000000000
             H    7.0692917090 -1.2490690741  0.0000000000
             H    7.0692917090  1.2490690741  0.0000000000
             H    4.9430735200  2.4988605526  0.0000000000
             H    2.4690554105  2.4968374995  0.0000000000
             H    0.0000000000  2.4973235097  0.0000000000
             H   -2.4690554105  2.4968374995  0.0000000000
             H   -4.9430735200  2.4988605526  0.0000000000
             H   -7.0692917090  1.2490690741  0.0000000000''',
    basis='sto-3g',verbose=4
).build()
#method = dft.RHF(mol).density_fit(auxbasis="def2-QZVPP-RIFIT")
#method.xc = 'x3lypg'
#method.grids.becke_scheme = dft.original_becke
#method.grids.level = 3
method = scf.RHF(mol).density_fit(auxbasis="def2-svp-jkfit")
#method.chkfile='restart.chk'
#D = method.get_init_guess(mol,'1e')
#method.init_guess = '1e'
#method.chkfile='init_guess.chk'
#chkfile.save_mol(mol,method.chkfile)
#chkfile.dump(method.chkfile,"init_guess",D)

print('Default DFT(RI-HF).  E = %.12f' % method.kernel())
print("Total job time: %10.2f(wall)" %(time()-TimeStart))

